import axios from '../axios'
export default class mfun {
  static async insertMeeting(params) { //新增
    let res = await axios.post('/business/meeting/insertMeeting', params)
    return res.data
  }
  static async getMeetingList(params) {//列表
    let res = await axios.post('/business/meeting/getMeetingList', params)
    return res.data
  }
  static async getMeetingDetail(id) {//详情
    let res = await axios.get(`/business/meeting/getMeetingDetail?id=${id}`)
    return res.data
  }
  static async getDept() {//根据登录人获取部门
    let userData = JSON.parse(sessionStorage.getItem('logOnUser'))
    let unitType = userData.unitType;
    let unitId = userData.unitId;
    let res = await axios.post(`/business/meeting/getDept`,{
      unitType: unitType,
      unitId: unitId
    })
    return res.data
  }
  static async downloadAnnex(name) {//下载附件
    let res = await axios.get(`/business/meeting/downloadAnnex?filename=${name}`)
    return res.data
  }
  static async getLoginUser() {//获取经办人
    let res = await axios.get(`/business/meeting/getLoginUser`)
    return res.data
  }
}